package com.opac.readerhome.plugin;

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;

import com.opac.readerhome.activity.QrActivity;

import android.content.Intent;
import android.net.Uri;

public class MakePhoneCall extends CordovaPlugin{
	@Override
    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
		Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+args)); 
        this.cordova.getActivity().startActivity(intent);
        return true;
    }
}
